﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchTransferTicket.ascx.cs" Inherits="Web.Views.Controls.SearchTransferTicket" %>
<script language="javascript">
    function CheckSearch() {
        var strfrom = document.getElementById("from1").value;
        var strto = document.getElementById("to_number1").value;
        if (strfrom != "" && strto != "") {
            window.location.href = "TransferTicket.aspx?from=" + escape(strfrom) + "&to=" + escape(strto);
        }
        else if (strfrom == "") {
        if (strto != "") {
                rxp = /^[\u4e00-\u9fa5]+$/g;
            if (!rxp.test(strto)) {
                window.location.href = "TransferTicket.aspx?tonumber=" + escape(strto);
                } 
            }
        }
    }
    
     //js获取url参数的function
    function RequestBindText() {
        var url = unescape(location.href);
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        var paraObj = {}
        for (i = 0; j = paraString[i]; i++) {
            paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
            if (j.substring(0, j.indexOf("=")).toLowerCase() == "from") {
                document.getElementById("from1").value = j.substring(j.indexOf("=") + 1, j.length)
            }
            if (j.substring(0, j.indexOf("=")).toLowerCase() == "to") {
                document.getElementById("to_number1").value = j.substring(j.indexOf("=") + 1, j.length)
            }
            if (j.substring(0, j.indexOf("=")).toLowerCase() == "tonumber") {
                document.getElementById("to_number1").value = j.substring(j.indexOf("=") + 1, j.length)
            }

        }
    }
</script>
	<div class="topBar" style="z-index:50">
        <ul class="tab_bar">
          <li class="now" id="ticket">火车票转让查询</li>
          <%--<li class="default" id="schedule" style="cursor:pointer"  onclick='ts("schedule","http://train.travel.sohu.com/schedule.php")'>列车时刻表查询</li>--%>
        </ul>
        <div class="tab_content"  >
        	<%--<form action="TransferTicket.aspx" method="post" id="form_search">--%>
			<div class="tab_inner">
	            <div class="left">
	            	<label>出发城市:</label>
	            	<input style="font-size:14px;" name="from" type="text" id="from1" value=""  />
	            </div>
	            <div class="left">
	            	<label>目的地城市或车次:</label>
	            	<input style="font-size:14px;" name="to_number" id="to_number1"  value="" type="text" />
	            	
	            </div>
	            <div id="ticket_show"   class="left"><a href="#"  onclick="CheckSearch()" class="btn151"></a></div>
	            <%--<div id="schedule_show" class="left" style="display:none;" ><a href="#"  onclick="check_search_form('schedule')" class="btn152"></a></div>--%>
	            <div class="left">
	            	<span class="link1" ><a href="NewTicket.aspx"  style="color:#ff4e00">·发布转让信息</a></span>
	            	<span class="link2"><a href="deleteTicket.aspx"  style="color:#ff4e00">·删除转让信息</a></span>
	            </div>       
        	</div>   
		<%--</form>--%>
        </div><!-- end tab_content -->
    </div><!-- end topBar -->
